package com.yunfeisoft.business.service.impl;

import com.yunfeisoft.business.dao.inter.ElderHealthEvaluationDao;
import com.yunfeisoft.business.model.ElderHealthEvaluation;
import com.yunfeisoft.business.service.inter.ElderHealthEvaluationService;
import com.yunfeisoft.common.base.BaseServiceImpl;
import com.yunfeisoft.common.sql.separation.DataSourceChange;
import com.yunfeisoft.common.utils.Page;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * ClassName: ElderHealthEvaluationServiceImpl
 * Description: 健康评价与指导从表service实现
 * Author: Jackie liu
 * Date: 2020-04-04
 */
@Service("elderHealthEvaluationService")
public class ElderHealthEvaluationServiceImpl extends BaseServiceImpl<ElderHealthEvaluation, String, ElderHealthEvaluationDao> implements ElderHealthEvaluationService {

    @Override
    @DataSourceChange(slave = true)
    public Page<ElderHealthEvaluation> queryPage(Map<String, Object> params) {
        return getDao().queryPage(params);
    }

    @Override
    public ElderHealthEvaluation getByHealthId(String elderHealthId) {
        return getDao().getByHealthId(elderHealthId);
    }

    @Override
    public void deleteByHealthId(String elderHealthId) {
        getDao().deleteByHealthId(elderHealthId);
    }
}